Carbon


UnmountVol

Header: Files.h Carbon status: Supported

Unmounts a volume that isn’t currently being used.

OSErr UnmountVol (
    ConstStr63Param volName, 
    SInt16 vRefNum
);
volName

The name of a mounted volume.

vRefNum

A volume reference number, a working directory reference number, a drive number, or 0 for the default volume.

function result

A result code.

DISCUSSION

All files on the volume (except those opened by the Operating System) must be closed before you call UnmountVol, which does not eject the volume.

Most applications do not need to use this function, because the user typically ejects (and possibly also unmounts) a volume in the Finder.

SPECIAL CONSIDERATIONS

Don’t unmount the startup volume. Doing so will cause a system crash.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)